From: kaf24@firebug.cl.cam.ac.uk Date: Thu, 25 May 2006 13:37:55 +0000 (+0100) Subject: Ensure trace-buffer size is set back to zero if trace buffers can't be allocated. X-Git-Tag: archive/raspbian/4.8.0-1+rpi1~1^2~16025^2~19 X-Git-Url: https://dgit.raspbian.org/%22http://www.example.com/cgi/success//%22http:/www.example.com/cgi/success/?a=commitdiff_plain;h=3854d519b574cf85d3e6ed833f18a8e5ccc03372;p=xen.git Ensure trace-buffer size is set back to zero if trace buffers can't be allocated. Signed-off-by: Atsushi Sakai --- diff --git a/xen/common/trace.c b/xen/common/trace.c index dbd0f7e7a0..0cee7126d2 100644 --- a/xen/common/trace.c +++ b/xen/common/trace.c @@ -91,6 +91,7 @@ static int alloc_trace_bufs(void) if ( (rawbuf = alloc_xenheap_pages(order)) == NULL ) { printk("Xen trace buffers: memory allocation failed\n"); + opt_tbuf_size = 0; return -EINVAL; } @@ -135,10 +136,7 @@ static int tb_set_size(int size) opt_tbuf_size = size; if ( alloc_trace_bufs() != 0 ) - { - opt_tbuf_size = 0; return -EINVAL; - } printk("Xen trace buffers: initialized\n"); return 0;